<!DOCTYPE html>
<html lang="en" xmlns:th="https://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<div th:replace="common/common::html"></div>
<head>
    <meta charset="UTF-8">
    <title th:text="#{post.page.detail}">Title</title>
    <script th:inline="javascript">
        $(function () {
            query();

        });//ready
        function query() {
            var dutyId = /*[[${session.dutyId}]]*/'';
            $("#duty-id").text(dutyId);
            $.ajax({
                type: 'post',
                async: false,
                dataType : 'json',
                url: /*[[@{/post/queryPostInfoById}]]*/'',
                data: [{name:"dutyId",value:dutyId}],
                success: function (data) {
                    console.info(data);
                    $("#duty-name").text(data.dutyName);
                    $("#duty-organ").text(data.organName);
                    $("#duty-role").text(data.roleName);
                    $("#duty-remark").text(data.remark);
                },
                error: function(msg){
                    message(/*[[#{common.error}]]*/'');
                }
            });
        }
    </script>
</head>
<body>
<div style="flex-grow: 1;display: flex;flex-direction: column;">
    <article style="flex-basis: 200px;">
        <form style="display: grid;grid-template-columns: auto auto">
            <div class="form-group">
                <span th:text="#{duty.id}"></span>
                <span id="duty-id" class="form-control"></span>
            </div>
            <div class="form-group">
                <span th:text="#{duty.name}"></span>
                <span id="duty-name" class="form-control"></span>
            </div>
            <div class="form-group">
                <span th:text="#{duty.organ.name}"></span>
                <span id="duty-organ" class="form-control"></span>
            </div>
            <div class="form-group">
                <span th:text="#{duty.role.name}"></span>
                <span id="duty-role" class="form-control"></span>
            </div>
            <div class="form-group">
                <span th:text="#{duty.remark}"></span>
                <span id="duty-remark" class="form-control"></span>
            </div>



        </form>
    </article>
    <article style="flex-grow: 1;background-color: #3c763d">
    </article>
</div>
</body>
</html>